//**********************************************************************************
// Klasse Eingabe-Panel - enthält Texteingabefeld und Hinzufüge-Button
//
//**********************************************************************************

package binarytree.view.input;

import java.awt.GridLayout;
import java.awt.event.ActionListener;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class InputValuePanel extends JPanel {
    
    private InputTextField inputTextField;
    private final AddValueButton addValueButton;
    
    public InputValuePanel() {
//        setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
        setLayout(new GridLayout(3, 1));
        add(new JLabel("Positiver Integerwert:"));
        inputTextField = new InputTextField();
        addValueButton = new AddValueButton();
        add(inputTextField);
        add(addValueButton);
        
    }

    public InputTextField getInputTextField() {
        return inputTextField;
    }
    
    public void addAddValueButtonAction(ActionListener l) {
        addValueButton.addActionListener(l);
    }
    
    
    
}
